//
//  YJSearchView.m
//  QuickCure1
//
//  Created by 陶永久 on 2016/11/3.
//  Copyright © 2016年 maoge. All rights reserved.
//

#import "YJSearchView.h"

@implementation YJSearchView

- (instancetype)initWithFrame:(CGRect)frame

{
    
    self = [super initWithFrame:frame];
    
    if (self) {
        
        UISearchBar *searchBar=[[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, frame.size.width-50, 30)];
        
        [searchBar setSearchBarStyle:UISearchBarStyleDefault];
        
        [searchBar setPlaceholder:@"请输入搜索内容"];
        
        [self addSubview:searchBar];
        
        UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
        
        button.frame=CGRectMake(searchBar.frame.size.width, 0, 50, 30);
        
        [button setImage:[UIImage imageNamed:@"iconfont-record.png"] forState:UIControlStateNormal];
        
        [self addSubview:button];
        
        [button addTarget:self action:@selector(speechSend) forControlEvents:UIControlEventTouchUpInside];
        
    }
    
    return self;
    
}

- (void)speechSend
{
    
}


@end
